//导入   
import {createStore, applyMiddleware, combineReducers} from 'redux';
//导入开发者工具
import {composeWithDevTools} from 'redux-devtools-extension'
//导入中间件
import thunk from 'redux-thunk';
//导入 reducer 函数
import countReducer from './reducers/countReducer';
import zanReducer from './reducers/zanReducer';
//合并 reducer 函数
let reducer =  combineReducers({
  count: countReducer,
  zan: zanReducer
});// 这行代码执行后, redux 中保存的数据, 将变为一个对象

                        // reducer 函数   加工厂函数
let store = createStore(reducer, composeWithDevTools(applyMiddleware(thunk)));

//默认暴露
export default store;

